Skip to content

docs(adr): ADR-0005 — operator alarm (value-threshold) model (#158 Phase 2)#239

Merged
takashikasuya merged 1 commit into
mainfrom
claude/adr-alarm-model-158-phase2
Jul 20, 2026
Merged

docs(adr): ADR-0005 — operator alarm (value-threshold) model (#158 Phase 2)#239
takashikasuya merged 1 commit into
mainfrom
claude/adr-alarm-model-158-phase2

Conversation

@takashikasuya

Copy link
Copy Markdown
Contributor

Summary

#158 Phase 2 asks to introduce an alarm concept, and frames the core design question as "can the SettingsRegistry (#148) be extended to hold thresholds, or is something else needed?". This PR is the design note — docs/adr/0005-alarm-model.md, Status: Proposed. No production code; implementation is gated on the maintainer's answers to the Open Questions. Same design-first pattern as ADR-0004 (#230), which worked well.

The ADR is grounded in the actual codebase (every claim file:line-cited), and answers the question:

Recommendations laid out as Open Decisions for you to weigh:

# Decision Recommendation
D1 Where thresholds live Twin per-point (bos:alarmHigh/Low [+warn]), projected like ControlSchema, with a SettingsRegistry scalar default. SettingsRegistry alone ❌. ControlSchema.Min/Max (control-write bounds) not reused as alarm bounds.
D2 Evaluation model Phase 2a: derived-on-read (freshness-parallel pure classifier + existing batch-latest, zero new persisted model). Phase 2b: background evaluator + event lifecycle (raise/clear/ack/history → wires to #162 notification policy).
D3 Threshold semantics Static high/low (+ optional warn/critical); numeric points only in 2a; no hysteresis in 2a (snapshot eval doesn't flap).
D4 UI Extend the operator-home attention list with value-breach items, worst-first; dedicated alarm route waits for Phase 2b.

Staged 2a → 2b → 2c (per-unit rule table + operator editing), each independently valuable and independently reviewable — the "軽量スライス先行" approach you endorsed for #158 Phase 1 and #230.

Test plan

  • Markdown fence balance checked (prose + tables, 0 code fences)
  • Every cited file path verified to exist; findings drawn from a grounded exploration of SettingsRegistry, the freshness infra, batch-latest, ControlSchema, and the operator-home attention list
  • Docs-only — no build/test surface (Frontend Check + .NET both path-skip)

Checklist

  • I read CONTRIBUTING.md and followed the coding conventions in CLAUDE.md
  • I added or updated tests — N/A (design note)
  • I updated relevant docs — this PR is the doc; slots into docs/adr/ as ADR-0005

🤖 Generated with Claude Code


Generated by Claude Code

…#158 Phase 2)

ADR-0005 (Proposed) resolves the #158 Phase 2 design question — "can the
SettingsRegistry hold alarm thresholds?" — and lays out the alarm/event model
for maintainer review before implementation.

Key findings + recommendations (grounded, file:line-cited):
- SettingsRegistry is scalar-only + global (no per-point dimension), so it
  CANNOT hold per-point thresholds — the issue's question answered "no".
- No alarm/event/value-threshold model exists anywhere; freshness/attention-list
  is the only "abnormal point" surface and keys on arrival staleness, not value.
- D1 thresholds: recommend twin per-point (bos:alarmHigh/Low [+warn]) projected
  like ControlSchema, with a SettingsRegistry scalar default; ControlSchema
  Min/Max (control-write bounds) intentionally not reused as alarm bounds.
- D2 evaluation: Phase 2a derived-on-read (freshness-parallel pure classifier +
  batch-latest, zero new persisted model), Phase 2b background evaluator +
  event lifecycle (raise/clear/ack/history) → wires to the #162 notification policy.
- D4 UI: extend the operator-home attention list with value-breach items,
  worst-first; a dedicated alarm route waits for Phase 2b (history/ack).

Staged 2a → 2b → 2c (per-unit rule table), each independently valuable. Ends
with Open Questions for maintainer decision. No production code — design note only.

Refs #158

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XEG6csNA9GDkQzT37CwAUp
Signed-off-by: Claude <noreply@anthropic.com>
@takashikasuya
takashikasuya merged commit 313ad79 into main Jul 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants